{extend name="property/public/insidePageBase" /}
{block name="title"}方案详情{/block}
{block name="css"}
{__block__}
<style>
    .layui-tab-brief img {
        width: 100%;
    }
</style>
{/block}
{block name="body"}
<div class="layuimini-container">
    <div class="layuimini-main">
        <div class="layui-form layui-form-pane">
            <table class="layui-hide" id="propertyPilesBasicList" lay-filter="propertyPilesBasicList"></table>
            <script type="text/html" id="piles_type_tpl">
                {{# if(d.piles_type === 1) { }}<span class="layui-badge layui-bg-blue">电动车桩</span>{{# } }}
                {{# if(d.piles_type === 2) { }}<span class="layui-badge layui-bg-cyan">汽车电桩</span>{{# } }}
            </script>
            <script type="text/html" id="out_type_tpl">
                {{# if(d.out_type === 1) { }}<span class="layui-badge layui-bg-blue">交流输出</span>{{# } }}
                {{# if(d.out_type === 2) { }}<span class="layui-badge layui-bg-cyan">直流输出</span>{{# } }}
                <span class="layui-badge layui-bg-orange">{{d.port_num}} 路</span>
            </script>
        </div>
    </div>
</div>
{/block}
{block name="js"}
{__block__}
<script>
    layui.use(['laydate','table'], function () {
        var laydate = layui.laydate, table = layui.table;

        // 充电桩列表
        var tableFaultyId = 'propertyPilesBasicList';
        table.render({
            elem: '#'+tableFaultyId,
            id:tableFaultyId,
            url: '{:url("propertyPilesBasicList")}?plan_id={:request()->get('plan_id')}',
            cols: [[
                {type: "checkbox", width: 50},
                {field: 'property_name', width: 158, title: '物业信息'},
                {field: 'piles_name', width: 258, title: '充电桩名称'},
                {field: 'piles_type', width: 108, title: '电桩类型',templet: '#piles_type_tpl', sort: true},
                {field: 'out_type', width: 138, title: '输出类型 端口',templet: '#out_type_tpl', sort: true},
                {field: 'sim_key', width: 208, title: 'SIM卡ID', sort: true,templet: '#is_online_tpl'},
                {field: 'power_rate', width: 108, title: '功率(W)', sort: true},
            ]],
            limits: [10, 15, 20, 25, 50, 100],
            limit: 15,
            page: true,
            height: 'full-80'
        });

    });
</script>
{/block}